﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        initControl();
        if (!!keyValue) {
            $.ajax({
                url: "/Gas/Company/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function initControl() {
        $("#AreaId").bindSelect({
            url: "/SystemManage/ItemsData/GetSelectJson",
            param: { enCode: "Area" }
        });
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/Gas/Company/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").resetSelection();
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <ul class="nav nav-tabs">
            <li role="presentation" class="active"><a href="#">基本信息</a></li>
            @*<li role="presentation"><a href="#">扩展信息</a></li>*@
        </ul>
        <div style="padding-top: 20px; margin-right: 30px;">
            <table class="form">
                <tr>
                    <th class="formTitle">企业名称</th>
                    <td class="formValue">
                        <input id="CompanyName" name="CompanyName" type="text" class="form-control required" placeholder="请输入企业名称" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">区域</th>
                    <td class="formValue">
                        <select id="AreaId" name="AreaId" class="form-control required"></select>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">介质</th>
                    <td class="formValue">
                        <input id="Media" name="Media" type="text" class="form-control" placeholder="请输入介质" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">加气机制造单位</th>
                    <td class="formValue">
                        <input id="DispenserMaker" name="DispenserMaker" type="text" class="form-control" placeholder="请输入加气机制造单位" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">加气机数量</th>
                    <td class="formValue">
                        <input id="DispenserCount" name="DispenserCount" type="text" class="form-control" placeholder="请输入加气机数量" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">加气枪数量</th>
                    <td class="formValue">
                        <input id="DispenserGunCount" name="DispenserGunCount" type="text" class="form-control" placeholder="请输入加气枪数量" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">地址</th>
                    <td class="formValue">
                        <input id="Address" name="Address" type="text" class="form-control" placeholder="请输入编号" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">备注</th>
                    <td class="formValue">
                        <input id="Remark" name="Remark" type="text" class="form-control" placeholder="请输入地址" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</form>
